package org.lanqiao.tjut.model;

import java.util.List;

import org.lanqiao.tjut.bean.TBStudentBean;
import org.lanqiao.tjut.db.DBFactory;
import org.lanqiao.tjut.myUtils.MyUtils;

public class StudentInfoAddModel {
	public int saveorupdateStudent2(TBStudentBean stuB){
		int i =0;
		String strsql="insert into student(student_name,sex,birthday,address_id,stu_tel,stu_img)"+"values(?,?,to_date(?,'yyyy-mm-dd hh24-mi-ss'),?,?,?)";
		
		Object[] params ={stuB.getStudent_name(),stuB.getSex(),MyUtils.convertDate2String(stuB.getBirthday(),"yyyy/MM/dd"),stuB.getAddress_id(),stuB.getStu_tel(),stuB.getStu_img()};
		i = DBFactory.getDBDriverInstance().update(strsql, params);
		
		
		return i;
	}


}
